package com.atom.process.cnmuseum.bm.dao.task;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Repository;

import com.atom.common.dao.AvensCommonDao;
import com.atom.common.mb.entity.gl.XzyxDO;
import com.atom.common.remote.user.UserUtil;
import com.atom.process.cnmuseum.bm.entity.task.BmXzyxTaskDO;

@Repository
public class BmXzyxTaskDao extends AvensCommonDao<BmXzyxTaskDO>{

	public void createADO(UserUtil user, String processInstanceId, String taskId, XzyxDO xzwjxx) {
		// TODO Auto-generated method stub
		BmXzyxTaskDO ado = new BmXzyxTaskDO();
        BeanUtils.copyProperties(xzwjxx, ado, "id");
        ado.setProcessId(processInstanceId);
        ado.setTaskId(taskId);
        save(ado);
	}

	public List<BmXzyxTaskDO> findByTaskIdAndFilesign(String taskId, String filesign) {
		// TODO Auto-generated method stub
		Map<String, Object> xzvars = new HashMap<String, Object>();
		xzvars.put("taskId", taskId);
		xzvars.put("filesign", "filesign");
        List<BmXzyxTaskDO> list = super.findByProperties(xzvars);
        return list;
	}

}
